
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>运行部署</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    <meta name="keywords" content="">
    <meta name="HandheldFriendly" content="true">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="shortcut icon" href="http://cdn.zitiao.org/favicon.ico" type="image/x-icon">
    
    <link rel="stylesheet" href="assets/website/page_custom.min.css">
    <script type="text/javascript" src="http://cdn.zitiao.org/www-tongji.js"></script>
    
    <link rel="next" href="update.html" />
    
    
    <link rel="prev" href="create.html" />
    

    </head>
    <body>
        
<div class="gb-page-wrapper">
    <header class="gb-page-header">
        <div class="container">
        
            <!-- search_input -->
            <div id="book-search-input" role="search">
                <input type="text" placeholder="输入并搜索" />
            </div>
            <!-- search_input -->

            
            <a href="." class="logo">
                <!-- <img src="images/logo.png"> -->
                <img src="http://cdn.zitiao.org/logo.png"/>
            </a>
            
            <a href="." class="logo">
                <h1>通过 GitBook 开源框架和 GitHub 私有化部署 Wiki 文档</h1>
            </a>
        
        </div>
    </header>

    <div class="gb-page-body">
        <div class="gb-page-inner">
            <div class="container">
                <div class="row">
                    <div class="col-md-3">
                        



    
    <div class="panel panel-default">
        

        <div class="list-group">
            
    
        
        <a href="./" class="list-group-item ">
        

            

            

            关于

        
        </a>
        

        
    
        
        <a href="create.html" class="list-group-item ">
        

            

            

            项目搭建

        
        </a>
        

        
    
        
        <a href="run.html" class="list-group-item active">
        

            

            

            运行部署

        
        </a>
        

        
    
        
        <a href="update.html" class="list-group-item ">
        

            

            

            更新文档

        
        </a>
        

        
    
        
        <a href="advanced.html" class="list-group-item ">
        

            

            

            进阶功能

        
        </a>
        

        
    

        </div>
    </div>
    



                    </div>
                    <div class="col-md-9">
                        <!-- search_result -->
                        <div id="book-search-results">
                            <div class="search-noresults">
                                
                                <!-- page -->
                                
                                <div class="gb-markdown book-page-inner page-inner">
                                    <h1 id="&#x8FD0;&#x884C;&#x90E8;&#x7F72;">&#x8FD0;&#x884C;&#x90E8;&#x7F72;</h1>
<h2 id="&#x4E00;&#x3001;&#x5C06;&#x9879;&#x76EE;&#x62C9;&#x5230;&#x670D;&#x52A1;&#x5668;">&#x4E00;&#x3001;&#x5C06;&#x9879;&#x76EE;&#x62C9;&#x5230;&#x670D;&#x52A1;&#x5668;</h2>
<p>&#x8FDB;&#x5165;&#x5230;&#x670D;&#x52A1;&#x5668;&#x5BF9;&#x5E94;&#x76EE;&#x5F55;&#xFF08;&#x672C;&#x5730;&#x7535;&#x8111;&#x548C;&#x8FDC;&#x7A0B;&#x670D;&#x52A1;&#x5668;&#x90FD;&#x53EF;&#x4EE5;&#xFF0C;&#x6211;&#x62FF;&#x6211;&#x7684;&#x672C;&#x5730; mac &#x7535;&#x8111;&#x6765;&#x6F14;&#x793A;&#xFF09;&#xFF0C;&#x5E76;&#x5C06;&#x4EE3;&#x7801;&#x514B;&#x9686;&#x4E0B;&#x6765;&#xFF0C;&#x6211;&#x5C06;&#x9879;&#x76EE;&#x514B;&#x9686;&#x5230;&#x6211;&#x7684; <code>wwwroot</code> &#x76EE;&#x5F55;&#xFF1A;</p>
<pre><code>vincent4j-mac:wwwroot vincent4j$ git clone git@github.com:zitiaocn/deploy.git
</code></pre><p>&#x81EA;&#x52A8;&#x6253;&#x51FA;&#x4E0B;&#x9762;&#x7684;&#x6587;&#x5B57;&#xFF0C;&#x4EE3;&#x8868;&#x514B;&#x9686;&#x4EE3;&#x7801;&#x6210;&#x529F;&#xFF1A;</p>
<pre><code>Cloning into &apos;deploy&apos;...
remote: Counting objects: 40, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 40 (delta 6), reused 36 (delta 5), pack-reused 0
Receiving objects: 100% (40/40), 23.04 KiB | 0 bytes/s, done.
Resolving deltas: 100% (6/6), done.
Checking connectivity... done.
</code></pre><h2 id="&#x4E8C;&#x3001;&#x5B89;&#x88C5;&#x73AF;&#x5883;">&#x4E8C;&#x3001;&#x5B89;&#x88C5;&#x73AF;&#x5883;</h2>
<h3 id="1&#x3001;&#x8FDB;&#x5165;&#x5230;&#x9879;&#x76EE;&#x76EE;&#x5F55;">1&#x3001;&#x8FDB;&#x5165;&#x5230;&#x9879;&#x76EE;&#x76EE;&#x5F55;</h3>
<pre><code>vincent4j-mac:wwwroot vincent4j$ cd deploy
vincent4j-mac:deploy vincent4j$
</code></pre><h3 id="2&#x3001;&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x73AF;&#x5883;">2&#x3001;&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x73AF;&#x5883;</h3>
<pre><code>npm install gitbook-cli -g
</code></pre><p>&#x6267;&#x884C;&#x5B8C;&#x4E4B;&#x540E;&#xFF0C;&#x518D;&#x6267;&#x884C;&#xFF1A;</p>
<pre><code>npm install
</code></pre><p>&#x4E0A;&#x9762;&#x4E24;&#x4E2A;&#x547D;&#x4EE4;&#x6267;&#x884C;&#x7684;&#x65F6;&#x95F4;&#x4F1A;&#x6BD4;&#x8F83;&#x957F;&#xFF0C;&#x8BF7;&#x8010;&#x5FC3;&#x7B49;&#x5F85;&#xFF0C;&#x5728;&#x8FD9;&#x671F;&#x95F4;&#x4F1A;&#x5C06; <code>Node.js</code> &#x73AF;&#x5883;&#x4E5F;&#x4E00;&#x5E76;&#x5B89;&#x88C5;&#x3002;</p>
<h3 id="3&#x3001;&#x5B89;&#x88C5;-gitbook-&#x6A21;&#x5757;">3&#x3001;&#x5B89;&#x88C5; GitBook &#x6A21;&#x5757;</h3>
<pre><code>gitbook install
</code></pre><p>&#x4F1A;&#x5B89;&#x88C5;&#x6240;&#x9700;&#x7684;&#x6240;&#x6709;&#x63D2;&#x4EF6;&#xFF0C;&#x5F53;&#x81EA;&#x52A8;&#x6253;&#x5370;&#x5982;&#x4E0B;&#x6587;&#x5B57;&#xFF0C;&#x4EE3;&#x8868;&#x5B89;&#x88C5;&#x6210;&#x529F;&#xFF1A;</p>
<pre><code>info: &gt;&gt; plugin &quot;sitemap-general&quot; installed with success
</code></pre><h3 id="4&#x3001;&#x7F16;&#x8BD1;&#x6587;&#x4EF6;">4&#x3001;&#x7F16;&#x8BD1;&#x6587;&#x4EF6;</h3>
<p>&#x4F9D;&#x6B21;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x4E09;&#x884C;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code>gitbook build
</code></pre><blockquote>
<p>&#x7F16;&#x8BD1;&#x6587;&#x4EF6;&#xFF0C;&#x7F16;&#x8BD1;&#x540E;&#x751F;&#x6210;&#x7684;&#x9759;&#x6001;&#x6587;&#x4EF6;&#x4F1A;&#x653E;&#x7F6E;&#x5728; <code>_book</code> &#x76EE;&#x5F55;&#x3002;</p>
</blockquote>
<pre><code>rm -rf _book_cache
cp -r _book _book_cache
</code></pre><blockquote>
<p>&#x5C06;&#x7F16;&#x8BD1;&#x7684;&#x6587;&#x4EF6;&#x4ECE; <code>_book</code> &#x590D;&#x5236;&#x5230; <code>_book_cache</code>&#xFF0C;&#x6700;&#x7EC8;&#x7F51;&#x7AD9;&#x8FD0;&#x884C;&#x65F6;&#x662F;&#x8BFB;&#x53D6; <code>_book_cache</code> &#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6587;&#x4EF6;&#x3002;</p>
</blockquote>
<h3 id="5&#x3001;&#x8FD0;&#x884C;">5&#x3001;&#x8FD0;&#x884C;</h3>
<pre><code>gitbook serve
</code></pre><p>&#x5F53;&#x81EA;&#x52A8;&#x6253;&#x5370;&#x51FA;&#x5982;&#x4E0B;&#x6587;&#x5B57;&#xFF0C;&#x5C31;&#x4EE3;&#x7801;&#x8FD0;&#x884C;&#x6210;&#x529F;&#xFF1A;</p>
<pre><code>Starting server ...
Serving book on http://localhost:4000
</code></pre><p>&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x91CC;&#x8BBF;&#x95EE; <a href="http://localhost:4000" target="_blank">http://localhost:4000</a> &#x5C31;&#x80FD;&#x770B;&#x5230;&#x6587;&#x6863;&#x4E86;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5; <code>&#x4E50;&#x5F00;&#x6000;</code> &#x54AF;&#x3002;</p>
<p><img src="http://cdn.zitiao.org/deploy/3h9zg.jpg" alt=""></p>
<h2 id="&#x4E09;&#x3001;&#x6CE8;&#x610F;&#x4E8B;&#x9879;">&#x4E09;&#x3001;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</h2>
<p>&#x540C;&#x4E00;&#x53F0;&#x670D;&#x52A1;&#x5668;&#x90E8;&#x7F72;&#x591A;&#x4E2A;&#x9879;&#x76EE;&#x65F6;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x5B89;&#x88C5;&#x4E00;&#x6B21; <code>&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x73AF;&#x5883;</code>&#x3002;</p>

                                </div>
                                
                                <!-- page -->

                            </div>
                            <div class="search-results">
                                <div class="has-results">
                                    
                                    <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
                                    <ul class="search-results-list"></ul>
                                    
                                </div>
                                <div class="no-results">
                                    
                                    <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
                                    
                                </div>
                            </div>
                        </div>
                        <!-- search_result -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <footer class="gb-page-footer">
        <div class="container footer-container">
            <div class="copyright">
                © 2017 <a href="http://zitiao.org">字条网 zitiao.org</a> | 京ICP备16051867号-2
            </div>
        </div>
    </footer>
</div>

<script src="gitbook/gitbook.js"></script>

    
    <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
    

    
    <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
    

    
    <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
    


<script>
    var gitbook = gitbook || [];
    gitbook.push(function() {
        gitbook.page.hasChanged({"page":{"title":"运行部署","level":"1.3","depth":1,"next":{"title":"更新文档","level":"1.4","depth":1,"path":"update.md","ref":"update.md","articles":[]},"previous":{"title":"项目搭建","level":"1.2","depth":1,"path":"create.md","ref":"create.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","-fontsettings","-lunr","-search","search-pro","theme-official","sitemap-general","livereload"],"root":".","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"sitemap-general":{"prefix":"http://zitiao.org/deploy/"},"search-pro":{},"livereload":{},"highlight":{},"theme-official":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","logo":"./images/logo.png","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"通过 GitBook 开源框架和 GitHub 私有化部署 Wiki 文档","language":"zh-hans","gitbook":">= 3.0.0"},"file":{"path":"run.md","mtime":"2017-10-12T07:24:55.364Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-10-12T08:33:43.469Z"},"basePath":".","book":{"language":""}});
    });
</script>
<script>
    $('.book-page-inner h1,.book-page-inner h2,.book-page-inner h3,.book-page-inner h4,.book-page-inner h5,.book-page-inner h6').click(function(){
        var id = $(this).attr('id');
        if(id) {
            window.location.hash=id;
        }
    });
</script>

        
    </body>
</html>

